#ifndef NETWORK_H
#define NETWORK_H

#include "activation.h"
#include "util.h"

#include <iostream>
#include <cstdio>
#include <vector>

#ifndef data_t
#define data_t double
#endif

class Network {
        friend class Backpropagation;

    protected:
        size_t _layersCount;
        size_t *_neuronsCount;

        data_t ***_synapses;
        data_t **_biases;
        Activation **_layerActivation;

        data_t*** synapses();
        data_t** biases();
        void applyChages(data_t ***weightChanges, data_t **biasChanges);


        Activation* activation( size_t layer ) const;

    public:
        explicit Network(const std::vector<size_t> &neurons, Activation *activation);
        ~Network();

        size_t neuronsCount( size_t layer ) const;
        size_t layersCount() const;

        /**
         * @brief print
         */
        void print();

        /**
         * @brief feed
         * @param input
         * @return
         */
        data_t* feed(data_t *input) const;
};


#endif // NETWORK_H
